﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Runtime.Serialization;

namespace com.hyrentals.data
{
    public class RentalRequest
    {
        public string Id { get; set; }
        public string RenterId { get; set; }
        public UserBasic Renter { get; set; }
        public string RVId { get; set; }
        public RV RelatedRV { get; set; }
        public RentalRequestStateType State { get; set; }
        public RVPricing Pricing { get; set; }
        public DateTime OpenTime { get; set; }
        public DateTime? CloseTime { get; set; }
        public DateTime CheckInTime { get; set; }
        public DateTime CheckOutTime { get; set; }
        public RentalRequest_PaymentDetail PaymentDetail { get; set; }
        public List<RentalRequest_History> History { get; set; }
    }

    [DataContract]
    public class RentalRequest_PaymentDetail
    {
        [DataMember(Name="SD_P")]
        public bool SecurityDepositPaid { get; set; }
        [DataMember(Name = "SD_P_A")]
        public decimal? SecurityDepositPaidAmount { get; set; }
        [DataMember(Name = "SD_P_T")]
        public DateTime? SecurityDepositPaidTime { get; set; }
        [DataMember(Name = "SD_R")]
        public bool SecurityDepositRefund { get; set; }
        [DataMember(Name = "SD_R_A")]
        public decimal? SecurityDepositRefundAmount { get; set; }
        [DataMember(Name = "SD_R_T")]
        public DateTime? SecurityDepositRefundTime { get; set; }


        [DataMember(Name = "RI_P")]
        public bool RenterInsurancePaid { get; set; }
        [DataMember(Name = "RI_P_A")]
        public decimal? RenterInsurancePaidAmount { get; set; }
        [DataMember(Name = "RI_P_T")]
        public DateTime? RenterInsurancePaidTime { get; set; }
        [DataMember(Name = "RI_R")]
        public bool RenterInsuranceRefund { get; set; }
        [DataMember(Name = "RI_R_A")]
        public decimal? RenterInsuranceRefundAmount { get; set; }
        [DataMember(Name = "RI_R_T")]
        public DateTime? RenterInsuranceRefundTime { get; set; }


        [DataMember(Name = "VC_P")]
        public bool VechicleChargePaid { get; set; }
        [DataMember(Name = "VC_P_A")]
        public decimal? VechicleChargePaidAmount { get; set; }
        [DataMember(Name = "VC_P_T")]
        public DateTime? VechicleChargePaidTime { get; set; }
        [DataMember(Name = "VC_R")]
        public bool VechicleChargeRefund { get; set; }
        [DataMember(Name = "VC_R_A")]
        public decimal? VechicleChargeRefundAmount { get; set; }
        [DataMember(Name = "VC_R_T")]
        public DateTime? VechicleChargeRefundTime { get; set; }
    }

    [DataContract]
    public class RentalRequest_History
    {
        [DataMember(Name = "Event")]
        public RentalRequestEventType EventType { get; set; }
        [DataMember(Name = "Sender")]
        public RentalRequestEventSenderType EventSenderType { get; set; }
        [DataMember(Name = "Time")]
        public DateTime ResponseTime { get; set; }
    }
}
